package com.xianggu.designMode.combination.demo01;

/**
 * 抽象根节点
 * @author chengjy
 * @date 2025/3/15
 */
public abstract class MenuComponent {

    protected String name;

    protected int level;

    public void add(MenuComponent menuComponent){
        throw new RuntimeException("");
    }
    public void addAll(MenuComponent... menuComponent){
        throw new RuntimeException("");
    }

    public void remove(MenuComponent menuComponent){
        throw new RuntimeException("");
    }

    public MenuComponent getChild(int index){
        throw new RuntimeException("");
    }

    public String getName() {
        return name;
    }

    public void print(){
        throw new RuntimeException("");
    }
}
